package com.dingding.order.core.cancel.dao;

import java.util.List;

import com.dingding.common.core.base.dao.IBaseDao;
import com.dingding.common.core.beans.Userordert;
import com.dingding.order.dto.cancel.PushAutomaticCancelOrderDTO;
import com.dingding.order.dto.cancel.PushCancelOrderDTO;
import com.dingding.order.dto.cancel.ReqCancelOrderDTO;

public interface ICancelUserOrderTDao extends IBaseDao<Userordert> {

	public List<PushAutomaticCancelOrderDTO> getCancelOrders();

	/**
	 * 
	 * 取消订单
	 * 
	 * 说明：orderId 不能使用reqCancelOrderDTO中的oid
	 * 
	 * 因为：当取消父订单时orderId将变为parOrderId
	 * 
	 * @Title: cancelOrder 
	 * @return  boolean true 成功 false 失败
	 * @author CHEHAUNBO
	 * 
	 */
	public boolean cancelOrder(ReqCancelOrderDTO reqCancelOrderDTO, String orderId);

	/**
	 * 
	 * 根据订单ID，获取所属当前订单的子订单数
	 * 
	 * @Title: getChildranCount 
	 * @return  int 子订单数量
	 * @author CHEHAUNBO
	 * 
	 */
	public int getChildranCount(String orderId);

	/** 
	 * 
	 * @Title: getUserOrder 
	 * @Description: 获取用户订单信息
	 * @param orderId  订单Id
	 * @author chenwei
	 * @return Userordert
	 * 
	 */
	public Userordert getUserOrder(String orderId);

	/**
	 * @Description:获取所有合乘订单
	 * @param oid
	 *            司机订单id
	 * @author fengshuonan
	 * @return List<Userordert> 所有合乘订单
	 */
	public List<Userordert> getAllCarShareOrder(String oid);

	/**
	 * 
	 * @Title: deleteCurrentOrder 
	 * @Description: 移除订单
	 * @param oid 订单Id
	 * @author YHQ 
	 * @return boolean true:成功  false:失败
	 * 
	 */
	public boolean deleteCurrentOrder(Userordert userordert);

	/**
	 * 
	 * @Title: getPushCancelOrderInfo 
	 * @Description: 用户取消订单-获取给司机发送短信和推送的消息
	 * @param passengerId	乘客Id
	 * @param driverId 司机Id
	 * @return PushCancelOrder    返回类型 
	 * 
	 */
	public PushCancelOrderDTO getPushCancelOrderInfo(String passengerId, String driverId);

	/**
	 * 
	 * @Title: getUserOrderByAutoCancel
	 * @Description: 获取自动取消订单列表
	 * @author yuHaiQing
	 * @return List<Userordert>    返回类型
	 * 
	 */
	public List<Userordert> getUserOrderByAutoCancel();
	
	/**
	 * 
	 * @Title: geAutomaticCancelOrderDTO 
	 * @Description: 获取自动取消的通知类
	 * @param passengerId 乘客Id
	 * @param driverId 司机Id
	 * @author YHQ 
	 * @return PushAutomaticCancelOrderDTO    返回类型
	 * 
	 */
	public PushAutomaticCancelOrderDTO geAutomaticCancelOrderDTO(String passengerId,String driverId,String oid);
	
}
